import request from "@/utils/request";

// 租户数量
export function leaseUserTotal(query) {
  return request({
    url: "/lease/user/total",
    method: "get",
    params: query,
  });
}

// 智能提醒
export function leaseRemind(query) {
  return request({
    url: "/lease/remind",
    method: "get",
    params: query,
  });
}

// 租户管理（首页） 分页
export function leasePage(data) {
  return request({
    url: "/lease/page",
    method: "post",
    data,
  });
}

// 【复用】所属单位
export function propertyOwnList(query) {
  return request({
    url: "/property/index/own/list",
    method: "get",
    params: query,
  });
}

// 租赁协议智能提醒列表
export function leaseRemindList(data) {
  return request({
    url: "/lease/remind/list",
    method: "post",
    data,
  });
}

// 租金缴纳智能提醒列表
export function leaseRentRemindList(data) {
  return request({
    url: "/lease/rent/remind/list",
    method: "post",
    data,
  });
}

// 新增 租户
export function addLeaseUserList(data) {
  return request({
    url: "/lease/user/add",
    method: "post",
    data,
  });
}

// 编辑 租户
export function editLeaseUserList(data) {
  return request({
    url: "/lease/user/edit",
    method: "post",
    data,
  });
}
// 删除 租户
export function delLeaseUser(leaseUserId) {
  return request({
    url: `/lease/user/del/${leaseUserId}`,
    method: "get",
  });
}

// 租户 基础信息
export function leaseBaseInfo(leaseUserId) {
  return request({
    url: `/lease/user/base/info/${leaseUserId}`,
    method: "get",
  });
}

// 资产地块下拉列表
export function leasePropertyList(data) {
  return request({
    url: "/lease/property/list",
    method: "post",
    data,
  });
}

// 资产类型下拉列表
export function leasePropertyTypeList(data) {
  return request({
    url: "/lease/property/type/list",
    method: "post",
    data,
  });
}

// 资产单元下拉列表
export function leasePropertyUnitList(data) {
  return request({
    url: "/lease/property/unit/list",
    method: "post",
    data,
  });
}

// 公寓套型下拉列表
export function leaseSuiteList(data) {
  return request({
    url: "/lease/suite/list",
    method: "post",
    data,
  });
}

// 删除 租赁信息
export function delLeaseInfo(leaseId) {
  return request({
    url: `/lease/info/del/${leaseId}`,
    method: "get",
  });
}


// 租赁信息历史记录
export function getLeaseHistory(leaseUserId) {
  return request({
    url: `/lease/info/history/${leaseUserId}`,
    method: "get",
  });
}

// 租赁信息
export function leaseInfoList(leaseUserId) {
  return request({
    url: `/lease/info/list/${leaseUserId}`,
    method: "get",
  });
}

// 新增 租赁信息
export function addleaseInfo(data) {
  return request({
    url: "/lease/info/add",
    method: "post",
    data,
  });
}

// 编辑 租赁信息
export function editleaseInfo(data) {
  return request({
    url: "/lease/info/edit",
    method: "post",
    data,
  });
}

// 归档 租赁信息
export function archivingleaseInfo(data) {
  return request({
    url: "/lease/info/archiving",
    method: "post",
    data,
  });
}


// 归档 租赁信息
export function leaseRentBatch(data) {
  return request({
    url: "/lease/rent/batch/edit",
    method: "post",
    data,
  });
}

// 删除租赁资产
export function delLeaseProperty(leasePropertyId) {
  return request({
    url: `/lease/property/del/${leasePropertyId}`,
    method: "get",
  });
}

